package com.fanqi.ipcapp;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by fanqi on 2020/5/29.
 * Description:
 */
public class Book implements Parcelable {

    private String no;

    private String name;

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Book(String no, String name) {
        this.no = no;
        this.name = name;
    }

    protected Book(Parcel in) {
        no = in.readString();
        name = in.readString();
    }

    public static final Creator<Book> CREATOR = new Creator<Book>() {
        @Override
        public Book createFromParcel(Parcel in) {
            return new Book(in);
        }

        @Override
        public Book[] newArray(int size) {
            return new Book[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(no);
        dest.writeString(name);
    }
}
